﻿namespace HiMap.CoordinateSystem
{
    using System;
    using System.Runtime.InteropServices;
    using System.Text;

    internal class VC
    {
        [DllImport("KMGisLib")]
        public static extern int KWG_COORDINATESYSTEM_CREATE_CUSTOM(StringBuilder name, double a, double f);
        [DllImport("KMGisLib")]
        public static extern int KWG_COORDINATESYSTEM_CREATE_DEFINED(int nCoordinateSystemType);
        [DllImport("KMGisLib")]
        public static extern void KWG_COORDINATESYSTEM_DELETE(int coordinatesystem_ptr);
        [DllImport("KMGisLib")]
        public static extern void KWG_COORDINATESYSTEM_GET_A(int coordinatesystem_ptr, ref double a);
        [DllImport("KMGisLib")]
        public static extern void KWG_COORDINATESYSTEM_GET_DISTANCE(double lat1, double lng1, double lat2, double lng2, ref double distance);
        [DllImport("KMGisLib")]
        public static extern void KWG_COORDINATESYSTEM_GET_F(int coordinatesystem_ptr, ref double f);
        [DllImport("KMGisLib")]
        public static extern int KWG_COORDINATESYSTEM_GET_TYPE(int coordinatesystem_ptr);
        [DllImport("KMGisLib")]
        public static extern int KWG_GAUSSPROJECTION_CREATE_CUSTOM(int gaussprojection_type, double line);
        [DllImport("KMGisLib")]
        public static extern int KWG_GAUSSPROJECTION_CREATE_STANDARD(int gaussprojection_type, bool has_zone);
        [DllImport("KMGisLib")]
        public static extern int KWG_GAUSSPROJECTION_GET_TYPE(int projection_ptr);
        [DllImport("KMGisLib")]
        public static extern void KWG_PROJECTION_CAL(int projection_ptr, int c, double longitude, double latitude, ref double X, ref double Y);
        [DllImport("KMGisLib")]
        public static extern void KWG_PROJECTION_DELETE(int projection_ptr);
        [DllImport("KMGisLib")]
        public static extern int KWG_PROJECTION_GET_TYPE(int projection_ptr);
        [DllImport("KMGisLib")]
        public static extern void KWG_PROJECTION_INVCAL(int projection_ptr, int c, double X, double Y, ref double longitude, ref double latitude);
        [DllImport("KMGisLib")]
        public static extern bool KWG_TRANS_POINT(int transcoord_ptr, double x1, double y1, ref double x2, ref double y2);
        [DllImport("KMGisLib")]
        public static extern int KWG_TRANSCOORD_CREATE(StringBuilder name);
        [DllImport("KMGisLib")]
        public static extern void KWG_TRANSCOORD_DELETE(int transcoord_ptr);
    }
}

